package com.mls.fivedistrict.pojo;

import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.NotBlank;

/**
 * <p>
 * 广告
 * </p>
 *
 * @author Five Team
 * @since 2018-06-08
 */
@Data
@Accessors(chain = true)
@TableName("t_advertising")
public class Advertising extends Model<Advertising> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 广告标题
     */
    @NotBlank(message = "标题不能为空")
    private String title;
    private String content;
    /**
     * 跳转url
     */
    @NotBlank(message = "url能为空")
    private String url;
    /**
     * 广告位置：首页、商品页面、探索页、快讯页、新闻页
     */
    private String type;
    /**
     * 动作类型：富文本、文本、无、url,商品、快讯、新闻
     */
    private String action;
    private Date createDate;
    private String createBy;
    private Date updateDate;
    private String updateBy;
    @TableLogic
    private Boolean isDelete;
    /**
     * 状态可用和不可用（enable、disabled）
     */
    private String status;
    private Integer orders;

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}

